import request from '@/utils/request.js'
const PATH = '/admin/banner'

// 获取轮播图列表
export const getBannerList = ({ page, pageSize, title }) =>
  request.get(PATH + '/pageQuery', { params: { page, pageSize, title } })

// 新增轮播图
export const addBanner = (data) => request.post(PATH + '/add', data)

// 修改轮播图状态
export const updateStatus = ({ id, status }) =>
  request.put(PATH + `/update/${id}/${status}`)

// 删除轮播图
export const deleteByIds = (ids) =>
  request.delete(PATH + '/deleteByIds', { params: { ids: ids.join(',') } })
